/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal.js");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.protocol = (function() {

    /**
     * Namespace protocol.
     * @exports protocol
     * @namespace
     */
    var protocol = {};

    /**
     * CoreBuiltinPacketID enum.
     * @name protocol.CoreBuiltinPacketID
     * @enum {number}
     * @property {number} PACKET_SS_TX_START=-1000 PACKET_SS_TX_START value
     * @property {number} PACKET_SS_TX_CMD=-1001 PACKET_SS_TX_CMD value
     * @property {number} PACKET_SS_TX_RESULT=-1002 PACKET_SS_TX_RESULT value
     * @property {number} PACKET_SS_SLICES=-1003 PACKET_SS_SLICES value
     * @property {number} PACKET_SS_AUTH=-1004 PACKET_SS_AUTH value
     * @property {number} PACKET_SS_KEEPALIVE=-1005 PACKET_SS_KEEPALIVE value
     * @property {number} PACKET_SS_AUTH_ACK=-1006 PACKET_SS_AUTH_ACK value
     */
    protocol.CoreBuiltinPacketID = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[-1000] = "PACKET_SS_TX_START"] = -1000;
        values[valuesById[-1001] = "PACKET_SS_TX_CMD"] = -1001;
        values[valuesById[-1002] = "PACKET_SS_TX_RESULT"] = -1002;
        values[valuesById[-1003] = "PACKET_SS_SLICES"] = -1003;
        values[valuesById[-1004] = "PACKET_SS_AUTH"] = -1004;
        values[valuesById[-1005] = "PACKET_SS_KEEPALIVE"] = -1005;
        values[valuesById[-1006] = "PACKET_SS_AUTH_ACK"] = -1006;
        return values;
    })();

    protocol.SSPacketKeepAlive = (function() {

        /**
         * Properties of a SSPacketKeepAlive.
         * @memberof protocol
         * @interface ISSPacketKeepAlive
         * @property {number} Flag SSPacketKeepAlive Flag
         */

        /**
         * Constructs a new SSPacketKeepAlive.
         * @memberof protocol
         * @classdesc Represents a SSPacketKeepAlive.
         * @implements ISSPacketKeepAlive
         * @constructor
         * @param {protocol.ISSPacketKeepAlive=} [properties] Properties to set
         */
        function SSPacketKeepAlive(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SSPacketKeepAlive Flag.
         * @member {number} Flag
         * @memberof protocol.SSPacketKeepAlive
         * @instance
         */
        SSPacketKeepAlive.prototype.Flag = 0;

        /**
         * Creates a new SSPacketKeepAlive instance using the specified properties.
         * @function create
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {protocol.ISSPacketKeepAlive=} [properties] Properties to set
         * @returns {protocol.SSPacketKeepAlive} SSPacketKeepAlive instance
         */
        SSPacketKeepAlive.create = function create(properties) {
            return new SSPacketKeepAlive(properties);
        };

        /**
         * Encodes the specified SSPacketKeepAlive message. Does not implicitly {@link protocol.SSPacketKeepAlive.verify|verify} messages.
         * @function encode
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {protocol.ISSPacketKeepAlive} message SSPacketKeepAlive message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketKeepAlive.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.Flag);
            return writer;
        };

        /**
         * Encodes the specified SSPacketKeepAlive message, length delimited. Does not implicitly {@link protocol.SSPacketKeepAlive.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {protocol.ISSPacketKeepAlive} message SSPacketKeepAlive message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketKeepAlive.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SSPacketKeepAlive message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.SSPacketKeepAlive} SSPacketKeepAlive
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketKeepAlive.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.SSPacketKeepAlive();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.Flag = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("Flag"))
                throw $util.ProtocolError("missing required 'Flag'", { instance: message });
            return message;
        };

        /**
         * Decodes a SSPacketKeepAlive message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.SSPacketKeepAlive} SSPacketKeepAlive
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketKeepAlive.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SSPacketKeepAlive message.
         * @function verify
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SSPacketKeepAlive.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.Flag))
                return "Flag: integer expected";
            return null;
        };

        /**
         * Creates a SSPacketKeepAlive message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.SSPacketKeepAlive} SSPacketKeepAlive
         */
        SSPacketKeepAlive.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.SSPacketKeepAlive)
                return object;
            var message = new $root.protocol.SSPacketKeepAlive();
            if (object.Flag != null)
                message.Flag = object.Flag | 0;
            return message;
        };

        /**
         * Creates a plain object from a SSPacketKeepAlive message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {protocol.SSPacketKeepAlive} message SSPacketKeepAlive
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SSPacketKeepAlive.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.Flag = 0;
            if (message.Flag != null && message.hasOwnProperty("Flag"))
                object.Flag = message.Flag;
            return object;
        };

        /**
         * Converts this SSPacketKeepAlive to JSON.
         * @function toJSON
         * @memberof protocol.SSPacketKeepAlive
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SSPacketKeepAlive.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SSPacketKeepAlive
         * @function getTypeUrl
         * @memberof protocol.SSPacketKeepAlive
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SSPacketKeepAlive.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.SSPacketKeepAlive";
        };

        return SSPacketKeepAlive;
    })();

    protocol.SSPacketAuth = (function() {

        /**
         * Properties of a SSPacketAuth.
         * @memberof protocol
         * @interface ISSPacketAuth
         * @property {string} AuthKey SSPacketAuth AuthKey
         * @property {number|Long} Timestamp SSPacketAuth Timestamp
         */

        /**
         * Constructs a new SSPacketAuth.
         * @memberof protocol
         * @classdesc Represents a SSPacketAuth.
         * @implements ISSPacketAuth
         * @constructor
         * @param {protocol.ISSPacketAuth=} [properties] Properties to set
         */
        function SSPacketAuth(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SSPacketAuth AuthKey.
         * @member {string} AuthKey
         * @memberof protocol.SSPacketAuth
         * @instance
         */
        SSPacketAuth.prototype.AuthKey = "";

        /**
         * SSPacketAuth Timestamp.
         * @member {number|Long} Timestamp
         * @memberof protocol.SSPacketAuth
         * @instance
         */
        SSPacketAuth.prototype.Timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new SSPacketAuth instance using the specified properties.
         * @function create
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {protocol.ISSPacketAuth=} [properties] Properties to set
         * @returns {protocol.SSPacketAuth} SSPacketAuth instance
         */
        SSPacketAuth.create = function create(properties) {
            return new SSPacketAuth(properties);
        };

        /**
         * Encodes the specified SSPacketAuth message. Does not implicitly {@link protocol.SSPacketAuth.verify|verify} messages.
         * @function encode
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {protocol.ISSPacketAuth} message SSPacketAuth message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketAuth.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.AuthKey);
            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.Timestamp);
            return writer;
        };

        /**
         * Encodes the specified SSPacketAuth message, length delimited. Does not implicitly {@link protocol.SSPacketAuth.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {protocol.ISSPacketAuth} message SSPacketAuth message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketAuth.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SSPacketAuth message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.SSPacketAuth} SSPacketAuth
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketAuth.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.SSPacketAuth();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.AuthKey = reader.string();
                        break;
                    }
                case 2: {
                        message.Timestamp = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("AuthKey"))
                throw $util.ProtocolError("missing required 'AuthKey'", { instance: message });
            if (!message.hasOwnProperty("Timestamp"))
                throw $util.ProtocolError("missing required 'Timestamp'", { instance: message });
            return message;
        };

        /**
         * Decodes a SSPacketAuth message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.SSPacketAuth} SSPacketAuth
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketAuth.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SSPacketAuth message.
         * @function verify
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SSPacketAuth.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isString(message.AuthKey))
                return "AuthKey: string expected";
            if (!$util.isInteger(message.Timestamp) && !(message.Timestamp && $util.isInteger(message.Timestamp.low) && $util.isInteger(message.Timestamp.high)))
                return "Timestamp: integer|Long expected";
            return null;
        };

        /**
         * Creates a SSPacketAuth message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.SSPacketAuth} SSPacketAuth
         */
        SSPacketAuth.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.SSPacketAuth)
                return object;
            var message = new $root.protocol.SSPacketAuth();
            if (object.AuthKey != null)
                message.AuthKey = String(object.AuthKey);
            if (object.Timestamp != null)
                if ($util.Long)
                    (message.Timestamp = $util.Long.fromValue(object.Timestamp)).unsigned = false;
                else if (typeof object.Timestamp === "string")
                    message.Timestamp = parseInt(object.Timestamp, 10);
                else if (typeof object.Timestamp === "number")
                    message.Timestamp = object.Timestamp;
                else if (typeof object.Timestamp === "object")
                    message.Timestamp = new $util.LongBits(object.Timestamp.low >>> 0, object.Timestamp.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a SSPacketAuth message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {protocol.SSPacketAuth} message SSPacketAuth
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SSPacketAuth.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.AuthKey = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.Timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.Timestamp = options.longs === String ? "0" : 0;
            }
            if (message.AuthKey != null && message.hasOwnProperty("AuthKey"))
                object.AuthKey = message.AuthKey;
            if (message.Timestamp != null && message.hasOwnProperty("Timestamp"))
                if (typeof message.Timestamp === "number")
                    object.Timestamp = options.longs === String ? String(message.Timestamp) : message.Timestamp;
                else
                    object.Timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.Timestamp) : options.longs === Number ? new $util.LongBits(message.Timestamp.low >>> 0, message.Timestamp.high >>> 0).toNumber() : message.Timestamp;
            return object;
        };

        /**
         * Converts this SSPacketAuth to JSON.
         * @function toJSON
         * @memberof protocol.SSPacketAuth
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SSPacketAuth.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SSPacketAuth
         * @function getTypeUrl
         * @memberof protocol.SSPacketAuth
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SSPacketAuth.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.SSPacketAuth";
        };

        return SSPacketAuth;
    })();

    protocol.SSPacketAuthAck = (function() {

        /**
         * Properties of a SSPacketAuthAck.
         * @memberof protocol
         * @interface ISSPacketAuthAck
         * @property {string|null} [Msg] SSPacketAuthAck Msg
         */

        /**
         * Constructs a new SSPacketAuthAck.
         * @memberof protocol
         * @classdesc Represents a SSPacketAuthAck.
         * @implements ISSPacketAuthAck
         * @constructor
         * @param {protocol.ISSPacketAuthAck=} [properties] Properties to set
         */
        function SSPacketAuthAck(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SSPacketAuthAck Msg.
         * @member {string} Msg
         * @memberof protocol.SSPacketAuthAck
         * @instance
         */
        SSPacketAuthAck.prototype.Msg = "";

        /**
         * Creates a new SSPacketAuthAck instance using the specified properties.
         * @function create
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {protocol.ISSPacketAuthAck=} [properties] Properties to set
         * @returns {protocol.SSPacketAuthAck} SSPacketAuthAck instance
         */
        SSPacketAuthAck.create = function create(properties) {
            return new SSPacketAuthAck(properties);
        };

        /**
         * Encodes the specified SSPacketAuthAck message. Does not implicitly {@link protocol.SSPacketAuthAck.verify|verify} messages.
         * @function encode
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {protocol.ISSPacketAuthAck} message SSPacketAuthAck message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketAuthAck.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.Msg != null && Object.hasOwnProperty.call(message, "Msg"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.Msg);
            return writer;
        };

        /**
         * Encodes the specified SSPacketAuthAck message, length delimited. Does not implicitly {@link protocol.SSPacketAuthAck.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {protocol.ISSPacketAuthAck} message SSPacketAuthAck message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketAuthAck.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SSPacketAuthAck message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.SSPacketAuthAck} SSPacketAuthAck
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketAuthAck.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.SSPacketAuthAck();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.Msg = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SSPacketAuthAck message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.SSPacketAuthAck} SSPacketAuthAck
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketAuthAck.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SSPacketAuthAck message.
         * @function verify
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SSPacketAuthAck.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.Msg != null && message.hasOwnProperty("Msg"))
                if (!$util.isString(message.Msg))
                    return "Msg: string expected";
            return null;
        };

        /**
         * Creates a SSPacketAuthAck message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.SSPacketAuthAck} SSPacketAuthAck
         */
        SSPacketAuthAck.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.SSPacketAuthAck)
                return object;
            var message = new $root.protocol.SSPacketAuthAck();
            if (object.Msg != null)
                message.Msg = String(object.Msg);
            return message;
        };

        /**
         * Creates a plain object from a SSPacketAuthAck message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {protocol.SSPacketAuthAck} message SSPacketAuthAck
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SSPacketAuthAck.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.Msg = "";
            if (message.Msg != null && message.hasOwnProperty("Msg"))
                object.Msg = message.Msg;
            return object;
        };

        /**
         * Converts this SSPacketAuthAck to JSON.
         * @function toJSON
         * @memberof protocol.SSPacketAuthAck
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SSPacketAuthAck.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SSPacketAuthAck
         * @function getTypeUrl
         * @memberof protocol.SSPacketAuthAck
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SSPacketAuthAck.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.SSPacketAuthAck";
        };

        return SSPacketAuthAck;
    })();

    protocol.SSPacketSlices = (function() {

        /**
         * Properties of a SSPacketSlices.
         * @memberof protocol
         * @interface ISSPacketSlices
         * @property {number} SeqNo SSPacketSlices SeqNo
         * @property {number} TotalSize SSPacketSlices TotalSize
         * @property {number} Offset SSPacketSlices Offset
         * @property {Uint8Array} PacketData SSPacketSlices PacketData
         */

        /**
         * Constructs a new SSPacketSlices.
         * @memberof protocol
         * @classdesc Represents a SSPacketSlices.
         * @implements ISSPacketSlices
         * @constructor
         * @param {protocol.ISSPacketSlices=} [properties] Properties to set
         */
        function SSPacketSlices(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SSPacketSlices SeqNo.
         * @member {number} SeqNo
         * @memberof protocol.SSPacketSlices
         * @instance
         */
        SSPacketSlices.prototype.SeqNo = 0;

        /**
         * SSPacketSlices TotalSize.
         * @member {number} TotalSize
         * @memberof protocol.SSPacketSlices
         * @instance
         */
        SSPacketSlices.prototype.TotalSize = 0;

        /**
         * SSPacketSlices Offset.
         * @member {number} Offset
         * @memberof protocol.SSPacketSlices
         * @instance
         */
        SSPacketSlices.prototype.Offset = 0;

        /**
         * SSPacketSlices PacketData.
         * @member {Uint8Array} PacketData
         * @memberof protocol.SSPacketSlices
         * @instance
         */
        SSPacketSlices.prototype.PacketData = $util.newBuffer([]);

        /**
         * Creates a new SSPacketSlices instance using the specified properties.
         * @function create
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {protocol.ISSPacketSlices=} [properties] Properties to set
         * @returns {protocol.SSPacketSlices} SSPacketSlices instance
         */
        SSPacketSlices.create = function create(properties) {
            return new SSPacketSlices(properties);
        };

        /**
         * Encodes the specified SSPacketSlices message. Does not implicitly {@link protocol.SSPacketSlices.verify|verify} messages.
         * @function encode
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {protocol.ISSPacketSlices} message SSPacketSlices message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketSlices.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.SeqNo);
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.TotalSize);
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.Offset);
            writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.PacketData);
            return writer;
        };

        /**
         * Encodes the specified SSPacketSlices message, length delimited. Does not implicitly {@link protocol.SSPacketSlices.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {protocol.ISSPacketSlices} message SSPacketSlices message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SSPacketSlices.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SSPacketSlices message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.SSPacketSlices} SSPacketSlices
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketSlices.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.SSPacketSlices();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.SeqNo = reader.int32();
                        break;
                    }
                case 2: {
                        message.TotalSize = reader.int32();
                        break;
                    }
                case 3: {
                        message.Offset = reader.int32();
                        break;
                    }
                case 4: {
                        message.PacketData = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("SeqNo"))
                throw $util.ProtocolError("missing required 'SeqNo'", { instance: message });
            if (!message.hasOwnProperty("TotalSize"))
                throw $util.ProtocolError("missing required 'TotalSize'", { instance: message });
            if (!message.hasOwnProperty("Offset"))
                throw $util.ProtocolError("missing required 'Offset'", { instance: message });
            if (!message.hasOwnProperty("PacketData"))
                throw $util.ProtocolError("missing required 'PacketData'", { instance: message });
            return message;
        };

        /**
         * Decodes a SSPacketSlices message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.SSPacketSlices} SSPacketSlices
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SSPacketSlices.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SSPacketSlices message.
         * @function verify
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SSPacketSlices.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.SeqNo))
                return "SeqNo: integer expected";
            if (!$util.isInteger(message.TotalSize))
                return "TotalSize: integer expected";
            if (!$util.isInteger(message.Offset))
                return "Offset: integer expected";
            if (!(message.PacketData && typeof message.PacketData.length === "number" || $util.isString(message.PacketData)))
                return "PacketData: buffer expected";
            return null;
        };

        /**
         * Creates a SSPacketSlices message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.SSPacketSlices} SSPacketSlices
         */
        SSPacketSlices.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.SSPacketSlices)
                return object;
            var message = new $root.protocol.SSPacketSlices();
            if (object.SeqNo != null)
                message.SeqNo = object.SeqNo | 0;
            if (object.TotalSize != null)
                message.TotalSize = object.TotalSize | 0;
            if (object.Offset != null)
                message.Offset = object.Offset | 0;
            if (object.PacketData != null)
                if (typeof object.PacketData === "string")
                    $util.base64.decode(object.PacketData, message.PacketData = $util.newBuffer($util.base64.length(object.PacketData)), 0);
                else if (object.PacketData.length >= 0)
                    message.PacketData = object.PacketData;
            return message;
        };

        /**
         * Creates a plain object from a SSPacketSlices message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {protocol.SSPacketSlices} message SSPacketSlices
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SSPacketSlices.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.SeqNo = 0;
                object.TotalSize = 0;
                object.Offset = 0;
                if (options.bytes === String)
                    object.PacketData = "";
                else {
                    object.PacketData = [];
                    if (options.bytes !== Array)
                        object.PacketData = $util.newBuffer(object.PacketData);
                }
            }
            if (message.SeqNo != null && message.hasOwnProperty("SeqNo"))
                object.SeqNo = message.SeqNo;
            if (message.TotalSize != null && message.hasOwnProperty("TotalSize"))
                object.TotalSize = message.TotalSize;
            if (message.Offset != null && message.hasOwnProperty("Offset"))
                object.Offset = message.Offset;
            if (message.PacketData != null && message.hasOwnProperty("PacketData"))
                object.PacketData = options.bytes === String ? $util.base64.encode(message.PacketData, 0, message.PacketData.length) : options.bytes === Array ? Array.prototype.slice.call(message.PacketData) : message.PacketData;
            return object;
        };

        /**
         * Converts this SSPacketSlices to JSON.
         * @function toJSON
         * @memberof protocol.SSPacketSlices
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SSPacketSlices.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SSPacketSlices
         * @function getTypeUrl
         * @memberof protocol.SSPacketSlices
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SSPacketSlices.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.SSPacketSlices";
        };

        return SSPacketSlices;
    })();

    protocol.TransactStart = (function() {

        /**
         * Properties of a TransactStart.
         * @memberof protocol
         * @interface ITransactStart
         * @property {protocol.ITransactParam} MyTNP TransactStart MyTNP
         * @property {protocol.ITransactParam} ParenTNP TransactStart ParenTNP
         * @property {Uint8Array|null} [CustomData] TransactStart CustomData
         */

        /**
         * Constructs a new TransactStart.
         * @memberof protocol
         * @classdesc Represents a TransactStart.
         * @implements ITransactStart
         * @constructor
         * @param {protocol.ITransactStart=} [properties] Properties to set
         */
        function TransactStart(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * TransactStart MyTNP.
         * @member {protocol.ITransactParam} MyTNP
         * @memberof protocol.TransactStart
         * @instance
         */
        TransactStart.prototype.MyTNP = null;

        /**
         * TransactStart ParenTNP.
         * @member {protocol.ITransactParam} ParenTNP
         * @memberof protocol.TransactStart
         * @instance
         */
        TransactStart.prototype.ParenTNP = null;

        /**
         * TransactStart CustomData.
         * @member {Uint8Array} CustomData
         * @memberof protocol.TransactStart
         * @instance
         */
        TransactStart.prototype.CustomData = $util.newBuffer([]);

        /**
         * Creates a new TransactStart instance using the specified properties.
         * @function create
         * @memberof protocol.TransactStart
         * @static
         * @param {protocol.ITransactStart=} [properties] Properties to set
         * @returns {protocol.TransactStart} TransactStart instance
         */
        TransactStart.create = function create(properties) {
            return new TransactStart(properties);
        };

        /**
         * Encodes the specified TransactStart message. Does not implicitly {@link protocol.TransactStart.verify|verify} messages.
         * @function encode
         * @memberof protocol.TransactStart
         * @static
         * @param {protocol.ITransactStart} message TransactStart message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactStart.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            $root.protocol.TransactParam.encode(message.MyTNP, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            $root.protocol.TransactParam.encode(message.ParenTNP, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.CustomData != null && Object.hasOwnProperty.call(message, "CustomData"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.CustomData);
            return writer;
        };

        /**
         * Encodes the specified TransactStart message, length delimited. Does not implicitly {@link protocol.TransactStart.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.TransactStart
         * @static
         * @param {protocol.ITransactStart} message TransactStart message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactStart.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TransactStart message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.TransactStart
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.TransactStart} TransactStart
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactStart.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.TransactStart();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.MyTNP = $root.protocol.TransactParam.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.ParenTNP = $root.protocol.TransactParam.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.CustomData = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("MyTNP"))
                throw $util.ProtocolError("missing required 'MyTNP'", { instance: message });
            if (!message.hasOwnProperty("ParenTNP"))
                throw $util.ProtocolError("missing required 'ParenTNP'", { instance: message });
            return message;
        };

        /**
         * Decodes a TransactStart message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.TransactStart
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.TransactStart} TransactStart
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactStart.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TransactStart message.
         * @function verify
         * @memberof protocol.TransactStart
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TransactStart.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            {
                var error = $root.protocol.TransactParam.verify(message.MyTNP);
                if (error)
                    return "MyTNP." + error;
            }
            {
                var error = $root.protocol.TransactParam.verify(message.ParenTNP);
                if (error)
                    return "ParenTNP." + error;
            }
            if (message.CustomData != null && message.hasOwnProperty("CustomData"))
                if (!(message.CustomData && typeof message.CustomData.length === "number" || $util.isString(message.CustomData)))
                    return "CustomData: buffer expected";
            return null;
        };

        /**
         * Creates a TransactStart message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.TransactStart
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.TransactStart} TransactStart
         */
        TransactStart.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.TransactStart)
                return object;
            var message = new $root.protocol.TransactStart();
            if (object.MyTNP != null) {
                if (typeof object.MyTNP !== "object")
                    throw TypeError(".protocol.TransactStart.MyTNP: object expected");
                message.MyTNP = $root.protocol.TransactParam.fromObject(object.MyTNP);
            }
            if (object.ParenTNP != null) {
                if (typeof object.ParenTNP !== "object")
                    throw TypeError(".protocol.TransactStart.ParenTNP: object expected");
                message.ParenTNP = $root.protocol.TransactParam.fromObject(object.ParenTNP);
            }
            if (object.CustomData != null)
                if (typeof object.CustomData === "string")
                    $util.base64.decode(object.CustomData, message.CustomData = $util.newBuffer($util.base64.length(object.CustomData)), 0);
                else if (object.CustomData.length >= 0)
                    message.CustomData = object.CustomData;
            return message;
        };

        /**
         * Creates a plain object from a TransactStart message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.TransactStart
         * @static
         * @param {protocol.TransactStart} message TransactStart
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TransactStart.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.MyTNP = null;
                object.ParenTNP = null;
                if (options.bytes === String)
                    object.CustomData = "";
                else {
                    object.CustomData = [];
                    if (options.bytes !== Array)
                        object.CustomData = $util.newBuffer(object.CustomData);
                }
            }
            if (message.MyTNP != null && message.hasOwnProperty("MyTNP"))
                object.MyTNP = $root.protocol.TransactParam.toObject(message.MyTNP, options);
            if (message.ParenTNP != null && message.hasOwnProperty("ParenTNP"))
                object.ParenTNP = $root.protocol.TransactParam.toObject(message.ParenTNP, options);
            if (message.CustomData != null && message.hasOwnProperty("CustomData"))
                object.CustomData = options.bytes === String ? $util.base64.encode(message.CustomData, 0, message.CustomData.length) : options.bytes === Array ? Array.prototype.slice.call(message.CustomData) : message.CustomData;
            return object;
        };

        /**
         * Converts this TransactStart to JSON.
         * @function toJSON
         * @memberof protocol.TransactStart
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TransactStart.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TransactStart
         * @function getTypeUrl
         * @memberof protocol.TransactStart
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TransactStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.TransactStart";
        };

        return TransactStart;
    })();

    protocol.TransactCtrlCmd = (function() {

        /**
         * Properties of a TransactCtrlCmd.
         * @memberof protocol
         * @interface ITransactCtrlCmd
         * @property {number|Long} TId TransactCtrlCmd TId
         * @property {number} Cmd TransactCtrlCmd Cmd
         */

        /**
         * Constructs a new TransactCtrlCmd.
         * @memberof protocol
         * @classdesc Represents a TransactCtrlCmd.
         * @implements ITransactCtrlCmd
         * @constructor
         * @param {protocol.ITransactCtrlCmd=} [properties] Properties to set
         */
        function TransactCtrlCmd(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * TransactCtrlCmd TId.
         * @member {number|Long} TId
         * @memberof protocol.TransactCtrlCmd
         * @instance
         */
        TransactCtrlCmd.prototype.TId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * TransactCtrlCmd Cmd.
         * @member {number} Cmd
         * @memberof protocol.TransactCtrlCmd
         * @instance
         */
        TransactCtrlCmd.prototype.Cmd = 0;

        /**
         * Creates a new TransactCtrlCmd instance using the specified properties.
         * @function create
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {protocol.ITransactCtrlCmd=} [properties] Properties to set
         * @returns {protocol.TransactCtrlCmd} TransactCtrlCmd instance
         */
        TransactCtrlCmd.create = function create(properties) {
            return new TransactCtrlCmd(properties);
        };

        /**
         * Encodes the specified TransactCtrlCmd message. Does not implicitly {@link protocol.TransactCtrlCmd.verify|verify} messages.
         * @function encode
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {protocol.ITransactCtrlCmd} message TransactCtrlCmd message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactCtrlCmd.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TId);
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.Cmd);
            return writer;
        };

        /**
         * Encodes the specified TransactCtrlCmd message, length delimited. Does not implicitly {@link protocol.TransactCtrlCmd.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {protocol.ITransactCtrlCmd} message TransactCtrlCmd message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactCtrlCmd.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TransactCtrlCmd message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.TransactCtrlCmd} TransactCtrlCmd
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactCtrlCmd.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.TransactCtrlCmd();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.TId = reader.int64();
                        break;
                    }
                case 2: {
                        message.Cmd = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("TId"))
                throw $util.ProtocolError("missing required 'TId'", { instance: message });
            if (!message.hasOwnProperty("Cmd"))
                throw $util.ProtocolError("missing required 'Cmd'", { instance: message });
            return message;
        };

        /**
         * Decodes a TransactCtrlCmd message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.TransactCtrlCmd} TransactCtrlCmd
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactCtrlCmd.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TransactCtrlCmd message.
         * @function verify
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TransactCtrlCmd.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.TId) && !(message.TId && $util.isInteger(message.TId.low) && $util.isInteger(message.TId.high)))
                return "TId: integer|Long expected";
            if (!$util.isInteger(message.Cmd))
                return "Cmd: integer expected";
            return null;
        };

        /**
         * Creates a TransactCtrlCmd message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.TransactCtrlCmd} TransactCtrlCmd
         */
        TransactCtrlCmd.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.TransactCtrlCmd)
                return object;
            var message = new $root.protocol.TransactCtrlCmd();
            if (object.TId != null)
                if ($util.Long)
                    (message.TId = $util.Long.fromValue(object.TId)).unsigned = false;
                else if (typeof object.TId === "string")
                    message.TId = parseInt(object.TId, 10);
                else if (typeof object.TId === "number")
                    message.TId = object.TId;
                else if (typeof object.TId === "object")
                    message.TId = new $util.LongBits(object.TId.low >>> 0, object.TId.high >>> 0).toNumber();
            if (object.Cmd != null)
                message.Cmd = object.Cmd | 0;
            return message;
        };

        /**
         * Creates a plain object from a TransactCtrlCmd message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {protocol.TransactCtrlCmd} message TransactCtrlCmd
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TransactCtrlCmd.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.TId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.TId = options.longs === String ? "0" : 0;
                object.Cmd = 0;
            }
            if (message.TId != null && message.hasOwnProperty("TId"))
                if (typeof message.TId === "number")
                    object.TId = options.longs === String ? String(message.TId) : message.TId;
                else
                    object.TId = options.longs === String ? $util.Long.prototype.toString.call(message.TId) : options.longs === Number ? new $util.LongBits(message.TId.low >>> 0, message.TId.high >>> 0).toNumber() : message.TId;
            if (message.Cmd != null && message.hasOwnProperty("Cmd"))
                object.Cmd = message.Cmd;
            return object;
        };

        /**
         * Converts this TransactCtrlCmd to JSON.
         * @function toJSON
         * @memberof protocol.TransactCtrlCmd
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TransactCtrlCmd.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TransactCtrlCmd
         * @function getTypeUrl
         * @memberof protocol.TransactCtrlCmd
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TransactCtrlCmd.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.TransactCtrlCmd";
        };

        return TransactCtrlCmd;
    })();

    protocol.TransactResult = (function() {

        /**
         * Properties of a TransactResult.
         * @memberof protocol
         * @interface ITransactResult
         * @property {number|Long} MyTId TransactResult MyTId
         * @property {number|Long} ChildTId TransactResult ChildTId
         * @property {number} RetCode TransactResult RetCode
         * @property {Uint8Array|null} [CustomData] TransactResult CustomData
         */

        /**
         * Constructs a new TransactResult.
         * @memberof protocol
         * @classdesc Represents a TransactResult.
         * @implements ITransactResult
         * @constructor
         * @param {protocol.ITransactResult=} [properties] Properties to set
         */
        function TransactResult(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * TransactResult MyTId.
         * @member {number|Long} MyTId
         * @memberof protocol.TransactResult
         * @instance
         */
        TransactResult.prototype.MyTId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * TransactResult ChildTId.
         * @member {number|Long} ChildTId
         * @memberof protocol.TransactResult
         * @instance
         */
        TransactResult.prototype.ChildTId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * TransactResult RetCode.
         * @member {number} RetCode
         * @memberof protocol.TransactResult
         * @instance
         */
        TransactResult.prototype.RetCode = 0;

        /**
         * TransactResult CustomData.
         * @member {Uint8Array} CustomData
         * @memberof protocol.TransactResult
         * @instance
         */
        TransactResult.prototype.CustomData = $util.newBuffer([]);

        /**
         * Creates a new TransactResult instance using the specified properties.
         * @function create
         * @memberof protocol.TransactResult
         * @static
         * @param {protocol.ITransactResult=} [properties] Properties to set
         * @returns {protocol.TransactResult} TransactResult instance
         */
        TransactResult.create = function create(properties) {
            return new TransactResult(properties);
        };

        /**
         * Encodes the specified TransactResult message. Does not implicitly {@link protocol.TransactResult.verify|verify} messages.
         * @function encode
         * @memberof protocol.TransactResult
         * @static
         * @param {protocol.ITransactResult} message TransactResult message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactResult.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int64(message.MyTId);
            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.ChildTId);
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.RetCode);
            if (message.CustomData != null && Object.hasOwnProperty.call(message, "CustomData"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.CustomData);
            return writer;
        };

        /**
         * Encodes the specified TransactResult message, length delimited. Does not implicitly {@link protocol.TransactResult.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.TransactResult
         * @static
         * @param {protocol.ITransactResult} message TransactResult message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactResult.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TransactResult message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.TransactResult
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.TransactResult} TransactResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactResult.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.TransactResult();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.MyTId = reader.int64();
                        break;
                    }
                case 2: {
                        message.ChildTId = reader.int64();
                        break;
                    }
                case 3: {
                        message.RetCode = reader.int32();
                        break;
                    }
                case 4: {
                        message.CustomData = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("MyTId"))
                throw $util.ProtocolError("missing required 'MyTId'", { instance: message });
            if (!message.hasOwnProperty("ChildTId"))
                throw $util.ProtocolError("missing required 'ChildTId'", { instance: message });
            if (!message.hasOwnProperty("RetCode"))
                throw $util.ProtocolError("missing required 'RetCode'", { instance: message });
            return message;
        };

        /**
         * Decodes a TransactResult message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.TransactResult
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.TransactResult} TransactResult
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactResult.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TransactResult message.
         * @function verify
         * @memberof protocol.TransactResult
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TransactResult.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.MyTId) && !(message.MyTId && $util.isInteger(message.MyTId.low) && $util.isInteger(message.MyTId.high)))
                return "MyTId: integer|Long expected";
            if (!$util.isInteger(message.ChildTId) && !(message.ChildTId && $util.isInteger(message.ChildTId.low) && $util.isInteger(message.ChildTId.high)))
                return "ChildTId: integer|Long expected";
            if (!$util.isInteger(message.RetCode))
                return "RetCode: integer expected";
            if (message.CustomData != null && message.hasOwnProperty("CustomData"))
                if (!(message.CustomData && typeof message.CustomData.length === "number" || $util.isString(message.CustomData)))
                    return "CustomData: buffer expected";
            return null;
        };

        /**
         * Creates a TransactResult message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.TransactResult
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.TransactResult} TransactResult
         */
        TransactResult.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.TransactResult)
                return object;
            var message = new $root.protocol.TransactResult();
            if (object.MyTId != null)
                if ($util.Long)
                    (message.MyTId = $util.Long.fromValue(object.MyTId)).unsigned = false;
                else if (typeof object.MyTId === "string")
                    message.MyTId = parseInt(object.MyTId, 10);
                else if (typeof object.MyTId === "number")
                    message.MyTId = object.MyTId;
                else if (typeof object.MyTId === "object")
                    message.MyTId = new $util.LongBits(object.MyTId.low >>> 0, object.MyTId.high >>> 0).toNumber();
            if (object.ChildTId != null)
                if ($util.Long)
                    (message.ChildTId = $util.Long.fromValue(object.ChildTId)).unsigned = false;
                else if (typeof object.ChildTId === "string")
                    message.ChildTId = parseInt(object.ChildTId, 10);
                else if (typeof object.ChildTId === "number")
                    message.ChildTId = object.ChildTId;
                else if (typeof object.ChildTId === "object")
                    message.ChildTId = new $util.LongBits(object.ChildTId.low >>> 0, object.ChildTId.high >>> 0).toNumber();
            if (object.RetCode != null)
                message.RetCode = object.RetCode | 0;
            if (object.CustomData != null)
                if (typeof object.CustomData === "string")
                    $util.base64.decode(object.CustomData, message.CustomData = $util.newBuffer($util.base64.length(object.CustomData)), 0);
                else if (object.CustomData.length >= 0)
                    message.CustomData = object.CustomData;
            return message;
        };

        /**
         * Creates a plain object from a TransactResult message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.TransactResult
         * @static
         * @param {protocol.TransactResult} message TransactResult
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TransactResult.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.MyTId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.MyTId = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.ChildTId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.ChildTId = options.longs === String ? "0" : 0;
                object.RetCode = 0;
                if (options.bytes === String)
                    object.CustomData = "";
                else {
                    object.CustomData = [];
                    if (options.bytes !== Array)
                        object.CustomData = $util.newBuffer(object.CustomData);
                }
            }
            if (message.MyTId != null && message.hasOwnProperty("MyTId"))
                if (typeof message.MyTId === "number")
                    object.MyTId = options.longs === String ? String(message.MyTId) : message.MyTId;
                else
                    object.MyTId = options.longs === String ? $util.Long.prototype.toString.call(message.MyTId) : options.longs === Number ? new $util.LongBits(message.MyTId.low >>> 0, message.MyTId.high >>> 0).toNumber() : message.MyTId;
            if (message.ChildTId != null && message.hasOwnProperty("ChildTId"))
                if (typeof message.ChildTId === "number")
                    object.ChildTId = options.longs === String ? String(message.ChildTId) : message.ChildTId;
                else
                    object.ChildTId = options.longs === String ? $util.Long.prototype.toString.call(message.ChildTId) : options.longs === Number ? new $util.LongBits(message.ChildTId.low >>> 0, message.ChildTId.high >>> 0).toNumber() : message.ChildTId;
            if (message.RetCode != null && message.hasOwnProperty("RetCode"))
                object.RetCode = message.RetCode;
            if (message.CustomData != null && message.hasOwnProperty("CustomData"))
                object.CustomData = options.bytes === String ? $util.base64.encode(message.CustomData, 0, message.CustomData.length) : options.bytes === Array ? Array.prototype.slice.call(message.CustomData) : message.CustomData;
            return object;
        };

        /**
         * Converts this TransactResult to JSON.
         * @function toJSON
         * @memberof protocol.TransactResult
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TransactResult.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TransactResult
         * @function getTypeUrl
         * @memberof protocol.TransactResult
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TransactResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.TransactResult";
        };

        return TransactResult;
    })();

    protocol.TransactParam = (function() {

        /**
         * Properties of a TransactParam.
         * @memberof protocol
         * @interface ITransactParam
         * @property {number|Long} TransNodeID TransactParam TransNodeID
         * @property {number} TransType TransactParam TransType
         * @property {number} OwnerType TransactParam OwnerType
         * @property {number} OwnerID TransactParam OwnerID
         * @property {number} SkeletonID TransactParam SkeletonID
         * @property {number} LevelNo TransactParam LevelNo
         * @property {number} AreaID TransactParam AreaID
         * @property {number|Long} TimeOut TransactParam TimeOut
         * @property {number} TransCommitType TransactParam TransCommitType
         */

        /**
         * Constructs a new TransactParam.
         * @memberof protocol
         * @classdesc Represents a TransactParam.
         * @implements ITransactParam
         * @constructor
         * @param {protocol.ITransactParam=} [properties] Properties to set
         */
        function TransactParam(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * TransactParam TransNodeID.
         * @member {number|Long} TransNodeID
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.TransNodeID = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * TransactParam TransType.
         * @member {number} TransType
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.TransType = 0;

        /**
         * TransactParam OwnerType.
         * @member {number} OwnerType
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.OwnerType = 0;

        /**
         * TransactParam OwnerID.
         * @member {number} OwnerID
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.OwnerID = 0;

        /**
         * TransactParam SkeletonID.
         * @member {number} SkeletonID
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.SkeletonID = 0;

        /**
         * TransactParam LevelNo.
         * @member {number} LevelNo
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.LevelNo = 0;

        /**
         * TransactParam AreaID.
         * @member {number} AreaID
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.AreaID = 0;

        /**
         * TransactParam TimeOut.
         * @member {number|Long} TimeOut
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.TimeOut = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * TransactParam TransCommitType.
         * @member {number} TransCommitType
         * @memberof protocol.TransactParam
         * @instance
         */
        TransactParam.prototype.TransCommitType = 0;

        /**
         * Creates a new TransactParam instance using the specified properties.
         * @function create
         * @memberof protocol.TransactParam
         * @static
         * @param {protocol.ITransactParam=} [properties] Properties to set
         * @returns {protocol.TransactParam} TransactParam instance
         */
        TransactParam.create = function create(properties) {
            return new TransactParam(properties);
        };

        /**
         * Encodes the specified TransactParam message. Does not implicitly {@link protocol.TransactParam.verify|verify} messages.
         * @function encode
         * @memberof protocol.TransactParam
         * @static
         * @param {protocol.ITransactParam} message TransactParam message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactParam.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TransNodeID);
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.TransType);
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.OwnerType);
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.OwnerID);
            writer.uint32(/* id 5, wireType 0 =*/40).int32(message.SkeletonID);
            writer.uint32(/* id 6, wireType 0 =*/48).int32(message.LevelNo);
            writer.uint32(/* id 7, wireType 0 =*/56).int32(message.AreaID);
            writer.uint32(/* id 8, wireType 0 =*/64).int64(message.TimeOut);
            writer.uint32(/* id 9, wireType 0 =*/72).int32(message.TransCommitType);
            return writer;
        };

        /**
         * Encodes the specified TransactParam message, length delimited. Does not implicitly {@link protocol.TransactParam.verify|verify} messages.
         * @function encodeDelimited
         * @memberof protocol.TransactParam
         * @static
         * @param {protocol.ITransactParam} message TransactParam message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TransactParam.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TransactParam message from the specified reader or buffer.
         * @function decode
         * @memberof protocol.TransactParam
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {protocol.TransactParam} TransactParam
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactParam.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.protocol.TransactParam();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.TransNodeID = reader.int64();
                        break;
                    }
                case 2: {
                        message.TransType = reader.int32();
                        break;
                    }
                case 3: {
                        message.OwnerType = reader.int32();
                        break;
                    }
                case 4: {
                        message.OwnerID = reader.int32();
                        break;
                    }
                case 5: {
                        message.SkeletonID = reader.int32();
                        break;
                    }
                case 6: {
                        message.LevelNo = reader.int32();
                        break;
                    }
                case 7: {
                        message.AreaID = reader.int32();
                        break;
                    }
                case 8: {
                        message.TimeOut = reader.int64();
                        break;
                    }
                case 9: {
                        message.TransCommitType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("TransNodeID"))
                throw $util.ProtocolError("missing required 'TransNodeID'", { instance: message });
            if (!message.hasOwnProperty("TransType"))
                throw $util.ProtocolError("missing required 'TransType'", { instance: message });
            if (!message.hasOwnProperty("OwnerType"))
                throw $util.ProtocolError("missing required 'OwnerType'", { instance: message });
            if (!message.hasOwnProperty("OwnerID"))
                throw $util.ProtocolError("missing required 'OwnerID'", { instance: message });
            if (!message.hasOwnProperty("SkeletonID"))
                throw $util.ProtocolError("missing required 'SkeletonID'", { instance: message });
            if (!message.hasOwnProperty("LevelNo"))
                throw $util.ProtocolError("missing required 'LevelNo'", { instance: message });
            if (!message.hasOwnProperty("AreaID"))
                throw $util.ProtocolError("missing required 'AreaID'", { instance: message });
            if (!message.hasOwnProperty("TimeOut"))
                throw $util.ProtocolError("missing required 'TimeOut'", { instance: message });
            if (!message.hasOwnProperty("TransCommitType"))
                throw $util.ProtocolError("missing required 'TransCommitType'", { instance: message });
            return message;
        };

        /**
         * Decodes a TransactParam message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof protocol.TransactParam
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {protocol.TransactParam} TransactParam
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TransactParam.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TransactParam message.
         * @function verify
         * @memberof protocol.TransactParam
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TransactParam.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.TransNodeID) && !(message.TransNodeID && $util.isInteger(message.TransNodeID.low) && $util.isInteger(message.TransNodeID.high)))
                return "TransNodeID: integer|Long expected";
            if (!$util.isInteger(message.TransType))
                return "TransType: integer expected";
            if (!$util.isInteger(message.OwnerType))
                return "OwnerType: integer expected";
            if (!$util.isInteger(message.OwnerID))
                return "OwnerID: integer expected";
            if (!$util.isInteger(message.SkeletonID))
                return "SkeletonID: integer expected";
            if (!$util.isInteger(message.LevelNo))
                return "LevelNo: integer expected";
            if (!$util.isInteger(message.AreaID))
                return "AreaID: integer expected";
            if (!$util.isInteger(message.TimeOut) && !(message.TimeOut && $util.isInteger(message.TimeOut.low) && $util.isInteger(message.TimeOut.high)))
                return "TimeOut: integer|Long expected";
            if (!$util.isInteger(message.TransCommitType))
                return "TransCommitType: integer expected";
            return null;
        };

        /**
         * Creates a TransactParam message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof protocol.TransactParam
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {protocol.TransactParam} TransactParam
         */
        TransactParam.fromObject = function fromObject(object) {
            if (object instanceof $root.protocol.TransactParam)
                return object;
            var message = new $root.protocol.TransactParam();
            if (object.TransNodeID != null)
                if ($util.Long)
                    (message.TransNodeID = $util.Long.fromValue(object.TransNodeID)).unsigned = false;
                else if (typeof object.TransNodeID === "string")
                    message.TransNodeID = parseInt(object.TransNodeID, 10);
                else if (typeof object.TransNodeID === "number")
                    message.TransNodeID = object.TransNodeID;
                else if (typeof object.TransNodeID === "object")
                    message.TransNodeID = new $util.LongBits(object.TransNodeID.low >>> 0, object.TransNodeID.high >>> 0).toNumber();
            if (object.TransType != null)
                message.TransType = object.TransType | 0;
            if (object.OwnerType != null)
                message.OwnerType = object.OwnerType | 0;
            if (object.OwnerID != null)
                message.OwnerID = object.OwnerID | 0;
            if (object.SkeletonID != null)
                message.SkeletonID = object.SkeletonID | 0;
            if (object.LevelNo != null)
                message.LevelNo = object.LevelNo | 0;
            if (object.AreaID != null)
                message.AreaID = object.AreaID | 0;
            if (object.TimeOut != null)
                if ($util.Long)
                    (message.TimeOut = $util.Long.fromValue(object.TimeOut)).unsigned = false;
                else if (typeof object.TimeOut === "string")
                    message.TimeOut = parseInt(object.TimeOut, 10);
                else if (typeof object.TimeOut === "number")
                    message.TimeOut = object.TimeOut;
                else if (typeof object.TimeOut === "object")
                    message.TimeOut = new $util.LongBits(object.TimeOut.low >>> 0, object.TimeOut.high >>> 0).toNumber();
            if (object.TransCommitType != null)
                message.TransCommitType = object.TransCommitType | 0;
            return message;
        };

        /**
         * Creates a plain object from a TransactParam message. Also converts values to other types if specified.
         * @function toObject
         * @memberof protocol.TransactParam
         * @static
         * @param {protocol.TransactParam} message TransactParam
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TransactParam.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.TransNodeID = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.TransNodeID = options.longs === String ? "0" : 0;
                object.TransType = 0;
                object.OwnerType = 0;
                object.OwnerID = 0;
                object.SkeletonID = 0;
                object.LevelNo = 0;
                object.AreaID = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.TimeOut = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.TimeOut = options.longs === String ? "0" : 0;
                object.TransCommitType = 0;
            }
            if (message.TransNodeID != null && message.hasOwnProperty("TransNodeID"))
                if (typeof message.TransNodeID === "number")
                    object.TransNodeID = options.longs === String ? String(message.TransNodeID) : message.TransNodeID;
                else
                    object.TransNodeID = options.longs === String ? $util.Long.prototype.toString.call(message.TransNodeID) : options.longs === Number ? new $util.LongBits(message.TransNodeID.low >>> 0, message.TransNodeID.high >>> 0).toNumber() : message.TransNodeID;
            if (message.TransType != null && message.hasOwnProperty("TransType"))
                object.TransType = message.TransType;
            if (message.OwnerType != null && message.hasOwnProperty("OwnerType"))
                object.OwnerType = message.OwnerType;
            if (message.OwnerID != null && message.hasOwnProperty("OwnerID"))
                object.OwnerID = message.OwnerID;
            if (message.SkeletonID != null && message.hasOwnProperty("SkeletonID"))
                object.SkeletonID = message.SkeletonID;
            if (message.LevelNo != null && message.hasOwnProperty("LevelNo"))
                object.LevelNo = message.LevelNo;
            if (message.AreaID != null && message.hasOwnProperty("AreaID"))
                object.AreaID = message.AreaID;
            if (message.TimeOut != null && message.hasOwnProperty("TimeOut"))
                if (typeof message.TimeOut === "number")
                    object.TimeOut = options.longs === String ? String(message.TimeOut) : message.TimeOut;
                else
                    object.TimeOut = options.longs === String ? $util.Long.prototype.toString.call(message.TimeOut) : options.longs === Number ? new $util.LongBits(message.TimeOut.low >>> 0, message.TimeOut.high >>> 0).toNumber() : message.TimeOut;
            if (message.TransCommitType != null && message.hasOwnProperty("TransCommitType"))
                object.TransCommitType = message.TransCommitType;
            return object;
        };

        /**
         * Converts this TransactParam to JSON.
         * @function toJSON
         * @memberof protocol.TransactParam
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TransactParam.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TransactParam
         * @function getTypeUrl
         * @memberof protocol.TransactParam
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TransactParam.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/protocol.TransactParam";
        };

        return TransactParam;
    })();

    return protocol;
})();

$root.echo = (function() {

    /**
     * Namespace echo.
     * @exports echo
     * @namespace
     */
    var echo = {};

    /**
     * PacketID enum.
     * @name echo.PacketID
     * @enum {number}
     * @property {number} PACKET_CS_PING=1000 PACKET_CS_PING value
     * @property {number} PACKET_SC_PONG=1001 PACKET_SC_PONG value
     */
    echo.PacketID = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[1000] = "PACKET_CS_PING"] = 1000;
        values[valuesById[1001] = "PACKET_SC_PONG"] = 1001;
        return values;
    })();

    echo.CSPacketPing = (function() {

        /**
         * Properties of a CSPacketPing.
         * @memberof echo
         * @interface ICSPacketPing
         * @property {number|Long} TimeStamb CSPacketPing TimeStamb
         * @property {string} Message CSPacketPing Message
         */

        /**
         * Constructs a new CSPacketPing.
         * @memberof echo
         * @classdesc Represents a CSPacketPing.
         * @implements ICSPacketPing
         * @constructor
         * @param {echo.ICSPacketPing=} [properties] Properties to set
         */
        function CSPacketPing(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CSPacketPing TimeStamb.
         * @member {number|Long} TimeStamb
         * @memberof echo.CSPacketPing
         * @instance
         */
        CSPacketPing.prototype.TimeStamb = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * CSPacketPing Message.
         * @member {string} Message
         * @memberof echo.CSPacketPing
         * @instance
         */
        CSPacketPing.prototype.Message = "";

        /**
         * Creates a new CSPacketPing instance using the specified properties.
         * @function create
         * @memberof echo.CSPacketPing
         * @static
         * @param {echo.ICSPacketPing=} [properties] Properties to set
         * @returns {echo.CSPacketPing} CSPacketPing instance
         */
        CSPacketPing.create = function create(properties) {
            return new CSPacketPing(properties);
        };

        /**
         * Encodes the specified CSPacketPing message. Does not implicitly {@link echo.CSPacketPing.verify|verify} messages.
         * @function encode
         * @memberof echo.CSPacketPing
         * @static
         * @param {echo.ICSPacketPing} message CSPacketPing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSPacketPing.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TimeStamb);
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.Message);
            return writer;
        };

        /**
         * Encodes the specified CSPacketPing message, length delimited. Does not implicitly {@link echo.CSPacketPing.verify|verify} messages.
         * @function encodeDelimited
         * @memberof echo.CSPacketPing
         * @static
         * @param {echo.ICSPacketPing} message CSPacketPing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSPacketPing.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CSPacketPing message from the specified reader or buffer.
         * @function decode
         * @memberof echo.CSPacketPing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {echo.CSPacketPing} CSPacketPing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSPacketPing.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.echo.CSPacketPing();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.TimeStamb = reader.int64();
                        break;
                    }
                case 2: {
                        message.Message = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("TimeStamb"))
                throw $util.ProtocolError("missing required 'TimeStamb'", { instance: message });
            if (!message.hasOwnProperty("Message"))
                throw $util.ProtocolError("missing required 'Message'", { instance: message });
            return message;
        };

        /**
         * Decodes a CSPacketPing message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof echo.CSPacketPing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {echo.CSPacketPing} CSPacketPing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSPacketPing.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CSPacketPing message.
         * @function verify
         * @memberof echo.CSPacketPing
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CSPacketPing.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.TimeStamb) && !(message.TimeStamb && $util.isInteger(message.TimeStamb.low) && $util.isInteger(message.TimeStamb.high)))
                return "TimeStamb: integer|Long expected";
            if (!$util.isString(message.Message))
                return "Message: string expected";
            return null;
        };

        /**
         * Creates a CSPacketPing message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof echo.CSPacketPing
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {echo.CSPacketPing} CSPacketPing
         */
        CSPacketPing.fromObject = function fromObject(object) {
            if (object instanceof $root.echo.CSPacketPing)
                return object;
            var message = new $root.echo.CSPacketPing();
            if (object.TimeStamb != null)
                if ($util.Long)
                    (message.TimeStamb = $util.Long.fromValue(object.TimeStamb)).unsigned = false;
                else if (typeof object.TimeStamb === "string")
                    message.TimeStamb = parseInt(object.TimeStamb, 10);
                else if (typeof object.TimeStamb === "number")
                    message.TimeStamb = object.TimeStamb;
                else if (typeof object.TimeStamb === "object")
                    message.TimeStamb = new $util.LongBits(object.TimeStamb.low >>> 0, object.TimeStamb.high >>> 0).toNumber();
            if (object.Message != null)
                message.Message = String(object.Message);
            return message;
        };

        /**
         * Creates a plain object from a CSPacketPing message. Also converts values to other types if specified.
         * @function toObject
         * @memberof echo.CSPacketPing
         * @static
         * @param {echo.CSPacketPing} message CSPacketPing
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CSPacketPing.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.TimeStamb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.TimeStamb = options.longs === String ? "0" : 0;
                object.Message = "";
            }
            if (message.TimeStamb != null && message.hasOwnProperty("TimeStamb"))
                if (typeof message.TimeStamb === "number")
                    object.TimeStamb = options.longs === String ? String(message.TimeStamb) : message.TimeStamb;
                else
                    object.TimeStamb = options.longs === String ? $util.Long.prototype.toString.call(message.TimeStamb) : options.longs === Number ? new $util.LongBits(message.TimeStamb.low >>> 0, message.TimeStamb.high >>> 0).toNumber() : message.TimeStamb;
            if (message.Message != null && message.hasOwnProperty("Message"))
                object.Message = message.Message;
            return object;
        };

        /**
         * Converts this CSPacketPing to JSON.
         * @function toJSON
         * @memberof echo.CSPacketPing
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CSPacketPing.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CSPacketPing
         * @function getTypeUrl
         * @memberof echo.CSPacketPing
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CSPacketPing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/echo.CSPacketPing";
        };

        return CSPacketPing;
    })();

    echo.SCPacketPong = (function() {

        /**
         * Properties of a SCPacketPong.
         * @memberof echo
         * @interface ISCPacketPong
         * @property {number|Long} TimeStamb SCPacketPong TimeStamb
         * @property {string} Message SCPacketPong Message
         */

        /**
         * Constructs a new SCPacketPong.
         * @memberof echo
         * @classdesc Represents a SCPacketPong.
         * @implements ISCPacketPong
         * @constructor
         * @param {echo.ISCPacketPong=} [properties] Properties to set
         */
        function SCPacketPong(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SCPacketPong TimeStamb.
         * @member {number|Long} TimeStamb
         * @memberof echo.SCPacketPong
         * @instance
         */
        SCPacketPong.prototype.TimeStamb = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * SCPacketPong Message.
         * @member {string} Message
         * @memberof echo.SCPacketPong
         * @instance
         */
        SCPacketPong.prototype.Message = "";

        /**
         * Creates a new SCPacketPong instance using the specified properties.
         * @function create
         * @memberof echo.SCPacketPong
         * @static
         * @param {echo.ISCPacketPong=} [properties] Properties to set
         * @returns {echo.SCPacketPong} SCPacketPong instance
         */
        SCPacketPong.create = function create(properties) {
            return new SCPacketPong(properties);
        };

        /**
         * Encodes the specified SCPacketPong message. Does not implicitly {@link echo.SCPacketPong.verify|verify} messages.
         * @function encode
         * @memberof echo.SCPacketPong
         * @static
         * @param {echo.ISCPacketPong} message SCPacketPong message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCPacketPong.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int64(message.TimeStamb);
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.Message);
            return writer;
        };

        /**
         * Encodes the specified SCPacketPong message, length delimited. Does not implicitly {@link echo.SCPacketPong.verify|verify} messages.
         * @function encodeDelimited
         * @memberof echo.SCPacketPong
         * @static
         * @param {echo.ISCPacketPong} message SCPacketPong message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCPacketPong.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SCPacketPong message from the specified reader or buffer.
         * @function decode
         * @memberof echo.SCPacketPong
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {echo.SCPacketPong} SCPacketPong
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCPacketPong.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.echo.SCPacketPong();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.TimeStamb = reader.int64();
                        break;
                    }
                case 2: {
                        message.Message = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("TimeStamb"))
                throw $util.ProtocolError("missing required 'TimeStamb'", { instance: message });
            if (!message.hasOwnProperty("Message"))
                throw $util.ProtocolError("missing required 'Message'", { instance: message });
            return message;
        };

        /**
         * Decodes a SCPacketPong message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof echo.SCPacketPong
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {echo.SCPacketPong} SCPacketPong
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCPacketPong.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SCPacketPong message.
         * @function verify
         * @memberof echo.SCPacketPong
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SCPacketPong.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isInteger(message.TimeStamb) && !(message.TimeStamb && $util.isInteger(message.TimeStamb.low) && $util.isInteger(message.TimeStamb.high)))
                return "TimeStamb: integer|Long expected";
            if (!$util.isString(message.Message))
                return "Message: string expected";
            return null;
        };

        /**
         * Creates a SCPacketPong message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof echo.SCPacketPong
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {echo.SCPacketPong} SCPacketPong
         */
        SCPacketPong.fromObject = function fromObject(object) {
            if (object instanceof $root.echo.SCPacketPong)
                return object;
            var message = new $root.echo.SCPacketPong();
            if (object.TimeStamb != null)
                if ($util.Long)
                    (message.TimeStamb = $util.Long.fromValue(object.TimeStamb)).unsigned = false;
                else if (typeof object.TimeStamb === "string")
                    message.TimeStamb = parseInt(object.TimeStamb, 10);
                else if (typeof object.TimeStamb === "number")
                    message.TimeStamb = object.TimeStamb;
                else if (typeof object.TimeStamb === "object")
                    message.TimeStamb = new $util.LongBits(object.TimeStamb.low >>> 0, object.TimeStamb.high >>> 0).toNumber();
            if (object.Message != null)
                message.Message = String(object.Message);
            return message;
        };

        /**
         * Creates a plain object from a SCPacketPong message. Also converts values to other types if specified.
         * @function toObject
         * @memberof echo.SCPacketPong
         * @static
         * @param {echo.SCPacketPong} message SCPacketPong
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SCPacketPong.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.TimeStamb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.TimeStamb = options.longs === String ? "0" : 0;
                object.Message = "";
            }
            if (message.TimeStamb != null && message.hasOwnProperty("TimeStamb"))
                if (typeof message.TimeStamb === "number")
                    object.TimeStamb = options.longs === String ? String(message.TimeStamb) : message.TimeStamb;
                else
                    object.TimeStamb = options.longs === String ? $util.Long.prototype.toString.call(message.TimeStamb) : options.longs === Number ? new $util.LongBits(message.TimeStamb.low >>> 0, message.TimeStamb.high >>> 0).toNumber() : message.TimeStamb;
            if (message.Message != null && message.hasOwnProperty("Message"))
                object.Message = message.Message;
            return object;
        };

        /**
         * Converts this SCPacketPong to JSON.
         * @function toJSON
         * @memberof echo.SCPacketPong
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SCPacketPong.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SCPacketPong
         * @function getTypeUrl
         * @memberof echo.SCPacketPong
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SCPacketPong.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/echo.SCPacketPong";
        };

        return SCPacketPong;
    })();

    return echo;
})();

module.exports = $root;
